<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>{:sysconf('site_name')}</title>
    <meta name="keywords" content="{:sysconf('site_name')}">
    <meta name="description" content="{:sysconf('site_name')}">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link href="__STATIC__/admin/css/tbinfo.css" rel="stylesheet">
    <style>
        .img{display: table}
        .img a{display: table-cell!important;max-height: 320px;max-width:430px;vertical-align: middle;}
        .img a img{display: inline-block;vertical-align: middle;}
    </style>
</head>
<body>
<div class="newinfo">
    <div class="newinfo_top">
        <div class="thumbimg fl">
            <div class="img" style="display: table">
                <a href="javascript:;" style=" " >
                    <img src="{$vo.thumb_430}" alt="{$vo.title}" style="max-width: 430px;max-height: 320px;">
                </a>
            </div>
            <div class="num">
                <ul>
                    <li>下载次数：<span>{$vo.downloads}</span></li>
                    <li>收藏次数：<span>{$vo.collects}</span></li>
                    <li>浏览量：<span>{$vo.views}</span></li>
                </ul>

            </div>

        </div>
        <div class="thumbinfo fr">
            <div class="title">{$vo.title}</div>
            <div class="detail">
                <ul>
                    <li><lable>上传者：</lable><span>{$vo.member}</span></li>
                    <li><lable>所需积分：</lable><span>{$vo.integral}</span></li>
                    <li><lable>来源：</lable><span>{$vo.channel}{$vo.from}</span></li>
                    <li><lable>图片尺寸：</lable><span>{$vo.size}</span></li>
                    <li><lable>是否免费：</lable><span>{$vo.is_free}</span></li>
                    <li><lable>图片格式：</lable><span>{$vo.format}</span></li>
                    <li><lable>所属类目：</lable><span>{$vo.category}</span></li>
                    <li><lable>图片形状：</lable><span>{$vo.type}</span></li>
                    <li><lable>所属分类：</lable><span>{$vo.catid}</span></li>
                    <li><lable>上下架：</lable><span>{$vo.show}</span></li>
                    <li><lable>图片类型：</lable><span>{$vo.quality}</span></li>
                    <li><lable>更新时间：</lable><span>{$vo.update_at}</span></li>
                </ul>
            </div>
            <div class="tags">
                <ul>
                    {foreach vo['tags'] as $tag}
                    <li>{$tag}</li>
                    {/foreach}
                </ul>
            </div>
        </div>
    </div>

    <div class="thumbcon">
        <div class="title">图片说明：</div>
        <div class="content">{$vo.content}</div>
    </div>
    <div class="checkarea">
        <form class="form-horizontal m-t" id="thumbStatusFrom"  method="post" action='{:url("$classuri/status")}'>
        <div class="anniu">
            <input type='hidden' value='{$vo.id}' name='id'/>
            <input type='hidden' value='{$vo.status}' name='status'/>
            {switch name="vo.status"}
            {case value="1"}<a class="lvse mr20">已通过审核</a>{/case}
            {case value="2"}<a class="hse">已拒绝</a>{/case}
            {default /}
                <button class="lvse mr20" type="submit" data-status="1">通过审核</button>
                <a class="hse" onclick="$('.refuse').show()">拒绝</a>
            {/switch}
        </div>
        <div class="refuse" {neq name="vo.status" value="2"}style="display: none"{/neq}>
            <div class="ref_input">
                <input type="text" name="reason" value="{$vo.reason}" placeholder="请在此输入拒绝理由,最多不超过50个字">
            </div>
            <button class="hse" type="submit" data-status="2">提交</button>
        </div>
        </form>
    </div>
</div>
</body>
</html>
<script src="__STATIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/admin/js/plugins/layer/layer.min.js"></script>
<script src="__STATIC__/admin/js/plugins/validate/jquery.validate.min.js"></script>
<script src="__STATIC__/admin/js/plugins/validate/messages_zh.min.js"></script>
<script src="__STATIC__/admin/js/form-validate-com.js"></script>
<script src="__STATIC__/admin/js/jquery.Oa.js"></script>
<script type="text/javascript">
    $('button[type="submit"]').click(function(){
        $('input[name=status]').val($(this).attr('data-status'))
    })
    //表单提交
    $('#thumbStatusFrom').validate({
        submitHandler: function(form) {
            //检查reason字数长度不超过50
            if($('input[name=reason]').val().length > 50){
                parent.layer.msg('理由不能超过50个字');
                return false;
            }
            $.Oa.doHform('#thumbStatusFrom',false,false,function(data){
                parent.layer.msg(data.msg);
                var iframe ='{$iframe}';
                var n = parent.$("iframe[name='"+iframe+"']").index();
                parent[n].$('#thumb_table').bootstrapTable('refresh');
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            })
        }
    })
</script>
